audio_form object
This method will set various speech settings for controls.
bool set_speech_verbosity_options(int control_id, string highlight_selection, string highlight_unselection, string deletion, string percentage, int keyboard_echo)
Parameters:
control_id
The ID of the control you wish to change.
highlight_selection
The text that is to be spoken when text is highlighted.
highlight_unselection
The text to be spoken when text is no longer highlighted.
deletion
The text that is to be spoken when text is deleted.
percentage
The text to be spoken after the value of the progress bar is read.
keyboard_echo
One of the input box speech flags (see constants).
Return value:
true on success, false on failure.
Remarks:
None.
Example:
// Make a simple form with a few buttons and a text field.
#include "form.bgt"
audio_form form;
void main()
{
form.create_window("Example Form", true);
int test=form.create_input_box("Test", "test", "", 0, false, false);
int ok=form.create_button("OK");
int cancel=form.create_button("E&xit");
form.set_speech_verbosity_options(test, "Selected", "Unselected", "Deleted", "%", textflag_characters);
while(true)
{
form.monitor();
wait(5);
if(form.is_pressed(ok))
{
exit();
}
if(form.is_pressed(cancel))
{
exit();
}
if((key_down(KEY_LMENU))&&(key_pressed(KEY_F4)))
{
exit();
}
}
}